<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="CSI.Directory.Web.Util"%>
<%@ Import Namespace="CSI.Directory.Core.Model"%>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%=((Article)ViewData["Article"]).Name %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MetaContent" runat="server">
	<meta name="description" content="<%=((Article)ViewData["Article"]).MetaDescription %>" />
	<meta name="keywords" content="<%=((Article)ViewData["Article"]).MetaKeywords %>" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<div class="main_center_content">
<div class="left_content">

    <%if (((CSI.Directory.Core.Model.Menu)ViewData["Menu"]).Name != "Index" && ((IList<Article>)ViewData["SubArticles"]).Count > 0)
      {%>
        <div class="box" style="width:150px">
        <h3><%=((CSI.Directory.Core.Model.Menu)ViewData["Menu"]).Title%></h3>
        <% if(((IList<Article>)ViewData["SubArticles"]).Count > 0){%>
        
            <% if(((IList<Article>)ViewData["SubArticles"]).Count <= 5){%>
                <%foreach (var a in ((IList<Article>)ViewData["SubArticles"])){%>p
                    <a href="/Home/Article/<%=a.Id %>/<%= Url.ToFriendlyUrl(a.Name) %>"><%=a.Title %></a><br /><br />
                <%}%>
            <%}else{ %>
                
                <%for(var i = 0; i < 5; i++){%>
                    <a href="/Home/Article/<%=((IList<Article>)ViewData["SubArticles"])[i].Id %>/<%= Url.ToFriendlyUrl(((IList<Article>)ViewData["SubArticles"])[i].Name) %>">
                        <%=((IList<Article>)ViewData["SubArticles"])[i].Title%></a>
                    <br /><br />
                <%}%>
                <a href="#" id="more-link" onclick="ShowMore(); return false;">more...</a>
                <div id="more" style="display:none">
                <%for (var j = 5; j < ((IList<Article>)ViewData["SubArticles"]).Count; j++)
                  {%>
                    <a href="/Home/Article/<%=((IList<Article>)ViewData["SubArticles"])[j].Id %>/<%= Url.ToFriendlyUrl(((IList<Article>)ViewData["SubArticles"])[j].Name) %>">
                        <%=((IList<Article>)ViewData["SubArticles"])[j].Title%></a>
                    <br /><br />
                <%}%>
                </div>
                
            
            <%} %>
            
            
            
            
        <%} %>
        </div>
    <%} %>
    
    <br />
<% Html.RenderPartial("/Views/Shared/LeftMenu.ascx"); %>    
   <script type='text/javascript'><!--      //<![CDATA[
      var m3_u = (location.protocol == 'https:' ? 'https://www.eaglefordflyer.com/advertise/www/delivery/ajs.php' : 'http://www.eaglefordflyer.com/advertise/www/delivery/ajs.php');
      var m3_r = Math.floor(Math.random() * 99999999999);
      if (!document.MAX_used) document.MAX_used = ',';
      document.write("<scr" + "ipt type='text/javascript' src='" + m3_u);
      document.write("?zoneid=5");
      document.write('&amp;cb=' + m3_r);
      if (document.MAX_used != ',') document.write("&amp;exclude=" + document.MAX_used);
      document.write(document.charset ? '&amp;charset=' + document.charset : (document.characterSet ? '&amp;charset=' + document.characterSet : ''));
      document.write("&amp;loc=" + escape(window.location));
      if (document.referrer) document.write("&amp;referer=" + escape(document.referrer));
      if (document.context) document.write("&context=" + escape(document.context));
      if (document.mmm_fo) document.write("&amp;mmm_fo=1");
      document.write("'><\/scr" + "ipt>");

      function ShowMore() {
          $("#more").css("display", "block");
          $("#more-link").css("display", "none");
          
      }
//]]>--></script><noscript><a href='http://www.eaglefordflyer.com/advertise/www/delivery/ck.php?n=a7029c74&amp;cb=7' target='_blank'><img src='http://www.eaglefordflyer.com/advertise/www/delivery/avw.php?zoneid=5&amp;cb=7&amp;n=a7029c74' border='0' alt='' /></a></noscript>
                      
</div><!--end of left content-->

<div class="right_content">
<h1><%=((Article)ViewData["Article"]).Name %></h1>

<p>
<%=((Article)ViewData["Article"]).Body %>
</p>
</div>
<div class="clear"></div>
</div>

</asp:Content>
